﻿using Nasty.Core.Attributes;
using SqlSugar;

namespace Nasty.Core.Entity.System
{
    [SugarTable("SysActionLog", TableDescription = "Api日志")]
    public class ActionLog : StandardEntity<ActionLog>
    {
        /// <summary>
        /// DisplayName
        /// </summary>
        [NastyColumn(ColumnName = "DisplayName", ColumnDescription = "DisplayName")]
        public string? DisplayName { get; set; }

        /// <summary>
        /// ControllerName
        /// </summary>
        [NastyColumn(ColumnName = "ControllerName", ColumnDescription = "ControllerName")]
        public string? ControllerName { get; set; }

        /// <summary>
        /// ActionName
        /// </summary>
        [NastyColumn(ColumnName = "ActionName", ColumnDescription = "ActionName")]
        public string? ActionName { get; set; }

        /// <summary>
        /// 请求体第三方Id 用于记录第三方唯一特征，方便第三方查找
        /// </summary>
        [NastyColumn(ColumnName = "RequestThirdId", IsNullable = true, ColumnDescription = "请求体第三方Id")]
        public string? RequestThirdId { get; set; }

        /// <summary>
        /// 响应体第三方Id 用于记录第三方唯一特征，方便第三方查找
        /// </summary>
        [NastyColumn(ColumnName = "ResponseThirdId", IsNullable = true, ColumnDescription = "响应体第三方Id")]
        public string? ResponseThirdId { get; set; }

        /// <summary>
        /// 请求内容
        /// </summary>
        [SugarColumn(ColumnName = "RequestContent", IsNullable = true, ColumnDescription = "请求内容", Length = 10000)]
        public string? RequestContent { get; set; }

        /// <summary>
        /// 响应内容
        /// </summary>
        [SugarColumn(ColumnName = "ResponseContent", IsNullable = true, ColumnDescription = "响应内容", Length = 10000)]
        public string? ResponseContent { get; set; }

        /// <summary>
        /// 自定义扩展字段
        /// </summary>
        [SugarColumn(ColumnName = "Extend", IsNullable = true, ColumnDescription = "自定义扩展字段", Length = 10000)]
        public string? Extend { get; set; }

        /// <summary>
        /// 销毁天数 - 多少天后销毁
        /// </summary>
        [SugarColumn(ColumnName = "DestroyDay", ColumnDescription = "销毁天数")]
        public int DestroyDay { get; set; }


        public override void OnPreAdd()
        {
            base.OnPreAdd();
        }
    }
}
